<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>

  //JavaScript中的关联数组，关联数组因为有key值的索引，
  // 所以在数组查找中比较便利，同时也使得相应的代码算法实现显得更清晰，易读易维护.
  var arr = [];

  arr['aaa'] = 1;
  arr['bbb'] = 2;
  arr.ccc = 3;
  console.log(arr);

  for (var i in arr) {
    console.log(i);
    console.log(arr[i]);
  }

</script>
</body>
</html>